package com.siyuanren.gcocp.dto;

import com.siyuanren.gcocp.consts.GcocpConsts;
import com.siyuanren.gcocp.entity.WxCourseChapter;
import com.siyuanren.gcocp.enumm.VideoTypeEnum;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created by   anxing
 * Project_name gcocp-parent
 * Path         com.siyuanren.gcocp.dto
 * Date         2018/4/17
 * Time         11:09
 * Description
 */
@Getter
@Setter
public class ChapterDTO extends WxCourseChapter{

    /**
     * 老师姓名
     */
    private String teacherName;
    /**
     * 老师头像
     */
    private String teacherImg;
    /**
     * 家庭作业是否完成
     */
    private boolean homeworkComplete;
    /**
     * 章节开始授课时间
     */
    private String startTimeStr;

    /**
     * 上次学习到的id
     */
    private int lastContentId;

    /**
     * 上次观看位置
     */
    private int position;

    /**
     * 音频url地址
     */
    private String audioUrl;

    /**
     * 视频播放次数
     */
    private Integer videoPlayCount;
    public String getTeacherImg() {
        return GcocpConsts.RESOURCE_WEB + teacherImg;
    }

    public String getVideoTypeStr() {
        return VideoTypeEnum.getDesc(super.getVideoType());
    }
}
